Polyimides are high performance materials that can be used in a range of applications due to their thermal and chemical stability, mechanical robustness, superior film-forming properties, and structural diversity. Recently, polyimides of intrinsic microporosity (PIM-PIs) demonstrated promising properties for membrane-based gas separation applications including air separations (O2/N2), efficient hydrogen recovery (H2/N2 and H2/CH4), natural gas sweetening (CO2/CH4) and carbon capture from flue gas (CO2/N2). Gas separation is an emerging technology with a rapidly developing market, as such there exists an urgent need for improved compositions and methods of synthesizing compounds that can be used for such applications.